__file__ = 'A11.py'
__author__ = 'Jerry Liu'
__date__ = '2016-04-14'

"""
    问题：敏感词文本文件 filtered_words.txt，里面的内容为以下内容，
        当用户输入敏感词语时，则打印出 Freedom，否则打印出 Human Rights。
"""

def filterwords():
    words = []
    f = open('d://filtered_words.txt', 'rb')
    for l in f.readlines():
        words.append(l.decode('utf-8'))

    iw = input('enter your words: ')
    for w in range(len(words)):
        if iw.find(words[w].strip()) > -1:
            print('Freedom')
        else:
            print('Human Rights')

if __name__ == '__main__':
    filterwords()
